<?php

namespace App\Console;
use DB;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
//        \APP\Jobs\Saosun::class,
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {    
        
         //$schedule->command(Saosun::handle,['--force'])->weekdays()->hourly()->timezone('UTC')->between('6:00','5:00');
//         $filePath =  __DIR__.'/../test.txt';
//         $schedule->command('Saosun')->sendOutputTo($filePath)->everyMinute();
//        $schedule->call(function () {
//            DB::table('cron')->increment('cron');
//        })->weekdays()->hourly()->timezone('UTC')->between('6:00','5:00');
    }

    /**
     * Register the Closure based commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        require base_path('routes/console.php');
    }
}
